<html>
<head><meta charset="utf-8"><title>Demangled symbol format · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html">Demangled symbol format</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="195345174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195345174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195345174">(Apr 26 2020 at 17:52)</a>:</h4>
<p>Hello! I've been running some analysis on binaries/shared lib of my rust projects. If I look at the demangled symbol, i can see a lot of <code>core::ptr::drop_in_place.XXXX</code> where <code>XXXX</code> is some integer number. Does someone know what is this integer? And why is there so many entries for apparently the same thing (ie: <code>core::ptr::drop_in_place</code> in my example)</p>



<a name="195346743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195346743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195346743">(Apr 26 2020 at 18:34)</a>:</h4>
<p>Ok i ended up finding <a href="https://github.com/rust-lang/rust/issues/60705" title="https://github.com/rust-lang/rust/issues/60705">https://github.com/rust-lang/rust/issues/60705</a><br>
I will try that mangling scheme to see the differences :)</p>



<a name="195347404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347404">(Apr 26 2020 at 18:52)</a>:</h4>
<p><span class="user-mention" data-user-id="281572">@marmeladema</span> <code>drop_in_place</code> is the name used for drop shims/drop glue, which is the code that calls <code>Drop::drop</code> and then recurses into fields when something is dropped.</p>



<a name="195347433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347433">(Apr 26 2020 at 18:53)</a>:</h4>
<p>Yep but i was wondering what was the .XXXX at the end. In the new mangling scheme, its waaay more detailed and most of those are now pointing to fully qualified "type name"</p>



<a name="195347486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347486">(Apr 26 2020 at 18:55)</a>:</h4>
<p>most of the symbols ending with a <code>.XXXXX</code> integer are gone but some are still there like:</p>
<div class="codehilite"><pre><span></span>  &quot;.text/&lt;wirefilter::types::Type as core::clone::Clone&gt;::clone.1885&quot;,
  &quot;.text/&lt;wirefilter::types::Type as core::clone::Clone&gt;::clone.2457&quot;,
</pre></div>



<a name="195347535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347535">(Apr 26 2020 at 18:56)</a>:</h4>
<p>(<code>.text</code> prefix being the section where the symbol is found)</p>



<a name="195347537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347537">(Apr 26 2020 at 18:56)</a>:</h4>
<p>True. It looks like shims have a special namespace in the new mangling scheme as well. Is v0 name mangling behind a flag?</p>



<a name="195347546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347546">(Apr 26 2020 at 18:57)</a>:</h4>
<p>Yes, i had to use nightly and add </p>
<div class="codehilite"><pre><span></span>[build]
rustflags = &quot;-Zsymbol-mangling-version=v0&quot;
</pre></div>


<p>to my cargo config file</p>



<a name="195347594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347594">(Apr 26 2020 at 18:58)</a>:</h4>
<p>Hmm. Not sure then. <span class="user-mention silent" data-user-id="119009">eddyb</span> would know, but I think they're not feeling well lately.</p>



<a name="195347598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Demangled%20symbol%20format/near/195347598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Demangled.20symbol.20format.html#195347598">(Apr 26 2020 at 18:58)</a>:</h4>
<p>:o i hope he's ok :o</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>